string_decrypt
This function decrypts a string previously encrypted by string_encrypt.
string string_decrypt(string the_string, string encryption_key)
Parameters:
the_string
The string to decrypt.
encryption_key
The key that will be used to decrypt the data. This must be the same key given when the string was encrypted.
Return value:
The decrypted string on success, or a blank string on failure.
Remarks:
The input string must match the string returned by string_encrypt. If you have converted the string to hexadecimal for printing, it is essential that you use hex_to_string to convert it back before using string_decrypt.
Example:
// Decrypt a string and print it.
void main()
{
string test="881C830C5245F740C578E6C4F4A7DE10F960D10F3E47535CF56F94DF4F2E4CB38E7C35CA0C30C71AED7A1F0F33BB35F2";
test=hex_to_string(test);
test=string_decrypt(test, "you_are_not_hacking_into_me");
alert("Decrypted string", test);
}